/**
 * @Title: MyInterceptor.java
 * @Description: 用一句话描述该文件做什么
 * @author zhangxin
 * @date 2019年3月13日
 */
package com.fortune.rainshine.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import com.fortune.rainshine.feign.common.RedisFeign;

import feign.Request;
import feign.RequestInterceptor;
import feign.RequestTemplate;

/**
 * @ClassName: MyInterceptor
 * @Description: 请求拦截器
 * @author zhangxin
 * @date 2019年3月5日
 */
//@Configuration
public class MyInterceptor implements RequestInterceptor {

	@Autowired
	RedisFeign redisFeign;

	private final static Logger logger = LoggerFactory.getLogger(MyInterceptor.class);

	public void apply(RequestTemplate requestTemplate) {
		Request request = requestTemplate.request();
		String url = request.url();
		System.out.println("ttttttttttttttttttttt==================" + url);
		redisFeign.set("123", "123654789");

	}

}
